home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / diag / bustest.zip / BUSTEST.REA < prev   
Text File  |  1994-04-13  |  5KB  |  132 lines

  1. SHORT: memory speed tester (OS2.0 required)
  2.  
  3. Hello world :)
  4.  
  5. bustest is a small utility to measure data transfer speed
  6. to and from memory. It requires AmigaOS2.0 or higher.
  7.  
  8. Method:
  9.  
  10. determine a 16kByte chunk of memory and time read and
  11. write operations with the pretty exact CIA timers. After
  12. that the overhead of the measurement is compensated.
  13. During measurement other tasks are locked out, but _interrupts_
  14. are not. However, interrupt activity shouldn't influence
  15. the measurement unless you send lots of data to the serial
  16. port or sit on a heavy duty network.
  17.  
  18. What you get ?
  19.  
  20. The performance of a very large sequence of MOVE instructions.
  21. Either word or long word moves or bursts of 8 longword moves
  22. using the MOVEM instruction are used.
  23.  
  24. Special caveat:
  25.  
  26. The 68040 usually uses a _copyback_ cache. This means, that
  27. _writing_ causes the cache to _read_ the data first (and later
  28. _write_ it) thus halving write performance when writing large
  29. blocks.
  30. Small blocks like local variables usually fit into the cache and
  31. are just read once which is the reason for the good performance
  32. of the copyback cache. But.. block writes are the worst case. The
  33. 68040 has a special MOVE16 instruction to circumvent that problem,
  34. but it is not used in the AmigaOS (nor in this test program).
  35.  
  36. How to use:
  37.  
  38. bustest accepts 2 parameters. One number and one address starting
  39. with a '-'. The number determines the number of loops, the higher
  40. the number the more accurate is the test. For most machines the
  41. default of 100 is sufficient. The address parameter gives an
  42. extra 16KB memory block to test. Normally bustest will allocate
  43. chunks of chip memory and fast memory and also checks read performance
  44. of the kickstart ROM addresses. The extra address can specify
  45. memory that does not appear in the system memory lists (like a
  46. _graphics frame buffer_) or memory that isn't reached by the next
  47. AllocMem call (say 16bit memory on a system with enough 32bit memory).
  48. bustest tries to check the address and will refuse to test it when
  49. it believes that the memory is used by anything else. BUT: it is
  50. possible to specify addresses that are not mapped to anything, resulting
  51. in thousands of bus errors. So be very careful when using that option.
  52.  
  53. A good means to find out what memory addresses is used by say a graphics
  54. board is the command 'showconfig'. Some boards map into two address
  55. ranges that seperate the framebuffer memory and the control registers,
  56. the larger block is then the framebuffer. If in doubt ask your board's
  57. manual or the manufacturer. Some cards also act different after their
  58. driver software has been loaded.
  59.  
  60. Examples:
  61.  
  62. 1> bustest
  63. BusSpeedTest 0.07 (mlelstv) Buffer:    16384 Bytes
  64. ==================================================
  65. loop overhead:      8.8ns
  66. register move:     82.3ns
  67. memtype   op      cycle      bandwidth
  68. fast      readw   244.8ns    8.2MByte/s
  69. fast      readl   331.8ns   12.1MByte/s
  70. fast      readm   304.7ns   13.1MByte/s
  71. fast      writew  246.4ns    8.1MByte/s
  72. fast      writel  246.6ns   16.2MByte/s
  73. fast      writem  225.0ns   17.8MByte/s
  74. chip      readw   879.0ns    2.3MByte/s
  75. chip      readl   881.5ns    4.5MByte/s
  76. chip      readm   660.4ns    6.1MByte/s
  77. chip      writew  570.7ns    3.5MByte/s
  78. chip      writel  570.4ns    7.0MByte/s
  79. chip      writem  570.9ns    7.0MByte/s
  80. rom       readw   245.8ns    8.1MByte/s
  81. rom       readl   332.5ns   12.0MByte/s
  82. rom       readm   305.1ns   13.1MByte/s
  83.  
  84. This is the output of bustest on my A3000/25.
  85.  
  86. 1> showconfig
  87. PROCESSOR:      CPU 68030/68882fpu/68030mmu
  88. CUSTOM CHIPS:   ECS PAL Agnus (id=$0020), ECS Denise (id=$00FC)
  89. VERS:   Kickstart version 40.68, Exec version 40.10, Disk version 40.42
  90. RAM:    Node type $A, Attributes $505 (FAST), at $7000000-$7F7FFFF (15.5 meg)
  91.         Node type $A, Attributes $703 (CHIP), at $400-$1FFFFF (~2.0 meg)
  92. BOARDS:
  93.  Board (unidentified):   Prod=2145/32($861/$20) (@$200000 2meg)
  94.  Board (unidentified):   Prod=43537/17($AA11/$11) (@$E90000 64K)
  95.  Board (unidentified):   Prod=18260/4($4754/$4) (@$EA0000 64K)
  96.  CBM Arcnet card:   Prod=514/9($202/$9) (@$EB0000 64K)
  97.  Board (unidentified):   Prod=2011/0($7DB/$0) (@$EF0000 64K)
  98.  
  99. The first board is an old Rainbow-2 framebuffer.
  100.  
  101. 1> bustest -$200000
  102. BusSpeedTest 0.07 (mlelstv) Buffer:    16384 Bytes
  103. ==================================================
  104. loop overhead:      9.1ns
  105. register move:     81.6ns
  106. memtype   op      cycle      bandwidth
  107. fast      readw   244.6ns    8.2MByte/s
  108. fast      readl   331.0ns   12.1MByte/s
  109. fast      readm   304.9ns   13.1MByte/s
  110. fast      writew  246.6ns    8.1MByte/s
  111. fast      writel  245.8ns   16.3MByte/s
  112. fast      writem  224.6ns   17.8MByte/s
  113. chip      readw   882.3ns    2.3MByte/s
  114. chip      readl   885.1ns    4.5MByte/s
  115. chip      readm   661.1ns    6.1MByte/s
  116. chip      writew  570.3ns    3.5MByte/s
  117. chip      writel  570.6ns    7.0MByte/s
  118. chip      writem  570.8ns    7.0MByte/s
  119. rom       readw   245.8ns    8.1MByte/s
  120. rom       readl   332.0ns   12.0MByte/s
  121. rom       readm   305.5ns   13.1MByte/s
  122. $00200000 readw   845.1ns    2.4MByte/s
  123. $00200000 readl  1561.6ns    2.6MByte/s
  124. $00200000 readm  1540.7ns    2.6MByte/s
  125. $00200000 writew  736.5ns    2.7MByte/s
  126. $00200000 writel 1478.8ns    2.7MByte/s
  127. $00200000 writem 1480.3ns    2.7MByte/s
  128.  
  129. You see the additional output for the graphics board.
  130.  
  131. Michael van Elst
  132.